package com.doit.day01

import org.apache.spark.{SparkConf, SparkContext}

/**
 * @Author:
 * @WX: 17710299606
 * @Tips: 学大数据 ,到多易教育
 * @DOC: https://blog.csdn.net/qq_37933018?spm=1000.2115.3001.5343
 * @Description:
 */
object Demo07Function01 {
  def main(args: Array[String]): Unit = {

    val conf = new SparkConf()
      .setMaster("local[*]")
      .setAppName(this.getClass.getSimpleName)
    val sc = SparkContext.getOrCreate(conf)


    val rdd = sc.makeRDD(List(1, 2, 3, 4, 5, 6, 7, 8), 2)

    val f = (x: Int) => x * 100
   // 每个元素执行一次f函数  处理数据
   val rdd2 = rdd.map(f)





    //  sc.stop()

  }

}
